cmake_minimum_required(VERSION 3.22)

project(demo1)

set (EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)


##添加 头文件路径

include_directories(code/user)

include_directories(code/app)
include_directories(code/app/Test_code)
include_directories(code/app/Master_schedule)

include_directories(code/middle/serve)
include_directories(code/middle/serve/memory_mange)
include_directories(code/middle/serve/cycle_storage)
include_directories(code/middle/middle_driver)
include_directories(code/middle/lib)

include_directories(code/hard_ware)




## 添加当前路径下 源文件
file(GLOB_RECURSE   SRC_LIST_APP     code/*.c      )
#file(GLOB_RECURSE   SRC_LIST_DIR     *.c                  )

##链接 pthread 库
set(CMAKE_CXX_FLAGS -pthread) 
##打印消息
message(STATUS "CMAKE_CXX_FLAGS = ${CMAKE_CXX_FLAGS}")

# 设置GDB调试
SET(CMAKE_BUILD_TYPE "Debug")
SET(CMAKE_CXX_FLAGS_DEBUG "$ENV{CXXFLAGS} -O0 -Wall -g2 -ggdb")
SET(CMAKE_CXX_FLAGS_RELEASE "$ENV{CXXFLAGS} -O3 -Wall")


#使用源文件 生成最终的文件
add_executable(
                emulation 
                
                ${SRC_LIST_APP} 
                
                )

  